package org.wang.client;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.wang.util.AjaxResult;

@FeignClient(value = "HRM-COMMON", fallbackFactory = RedisClientFallbackFactory.class )//服务提供
@RequestMapping("/redis")
public interface RedisClient {
    @PostMapping
    AjaxResult add(@RequestParam(value = "key",required = true) String key,@RequestParam(value = "value",required = true) String value);
    @PostMapping("/time")
    AjaxResult addForTime(@RequestParam(value = "key",required = true) String key
            ,@RequestParam(value = "value",required = true) String value,@RequestParam(value = "time",required = true)Integer time);
    @DeleteMapping
    AjaxResult del(@RequestParam(value = "key",required = true) String key);
    @GetMapping
    String get(@RequestParam(value = "key",required = true) String key);

}
